package cn.sample.system.service.impl;

import cn.sample.system.bean.User;
import cn.sample.system.mapper.UserMapper;
import cn.sample.system.service.UserSupport;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <h2></h2>
 *
 * <p></p>
 *
 * @author HKD
 */
@Service
public class UserSupportImpl extends ServiceImpl<UserMapper, User> implements UserSupport {

    @Override
    public User loadUserByUsername(String username) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("username",username);
        return getOne(queryWrapper);
    }
}
